window.onload = function () {
  let btns = document.querySelectorAll(".head");
  let boxs = document.querySelectorAll(".content-box");
  let arrows = document.querySelectorAll(".head-after");
  for (let i = 0; i < boxs.length; i++) {
    let flag = false;
    btns[i].onclick = function () {
      flag = !flag;
      boxs[i].style.height = flag ? "133px" : "0px";
      arrows[i].style.borderColor = flag
        ? "transparent transparent #fff transparent"
        : "";
      arrows[i].style.top = flag ? "22%" : "";
    };
  }
};
